﻿@using Resources;
@{   
    Layout = "~/Views/Shared/Layaout/general/_LayoutGeneral.cshtml";    
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <script type="text/javascript" language="javascript" src="@Url.Content(@properties.dependenciaJS)" ></script>

<center>
    <div class="tituloWhite8" style="width: 100%;text-align:right;">@ViewBag.TITULO</div>
<script type="text/javascript">
    $(function () {
        setAutoAyudaGen("#vDescripcion", "#nIdeDep", "/AutoAyuda/ListaMaeDependenciaAuto");        
    });
    function envia() {
        listarDependencia('1');
    }
</script>
    <table style="width: 100%;" border="0" cellpadding="2" cellspacing="0" class="tablaInterna1">
        <tbody>           
            <tr>
                <td align="center">
                    <table border="0" cellpadding="0" cellspacing="0">
                        <tbody class="tituloCelesteB8">
                        <tr>
                            <td><span class="letraLink8" onclick="javascript:cleanCacheTipoRegion(this);">Por Región</span></td>
                            <td>:</td>
                            <td>
                                @Html.DropDownList("nIdeTipo", (IEnumerable<SelectListItem>)ViewBag.DepTipoRegion, "--Seleccione--", new { onchange = "javascript:listarDepenPoRegion(this.value);", @class = "select8" })
                            </td>
                            <td>
                                <input type="button" style="width:20px;" id="btnRegById" value="IR" onclick="javascript: listarDepenPoRegion();"/>                                        
                            </td>                            
                            <td style="width:55px;">&nbsp;</td>
                            <td>Por Id</td>
                            <td>:&nbsp;</td>
                            <td>@Html.TextBox("nIdeDep", null,new {@style="width:30px;", maxlength=4 })</td>
                            <td>&nbsp;</td>
                            <td>
                                <input type="button" style="width:20px;" id="btnDepById" value="IR" onclick="javascript: listarDependencia('1');"/>                                        
                            </td>
                            <td style="width:55px;">&nbsp;</td>
                            <td>Por Nombre</td>
                            <td>:</td>
                            <td>@Html.TextBox("vDescripcion", null, new {style = "width: 300px;",maxlength="20", ondblclick="javascript:cleanBox(this);", onkeyup="javascript:this.value=this.value.toUpperCase();"})</td>
                            <td>&nbsp;</td>
                            <td>
                                <input type="button" style="width:55px;" id="btnBuscar" value="Consultar" onclick="javascript: listarDependencia('2');"/>                                        
                            </td>
                            <td>&nbsp;</td>
                            <td>
                                <input type="button" style="width:70px;" value="Nueva region" onclick="javascript: agregarRegion();" />
                            </td>
                            <td><span  id="spanClic" onclick="javascript:listaCatalogo('1');"/></td>
                        </tr>
                    </tbody>
                    </table>
                </td>
            </tr>
        </tbody>
    </table>
    <div id="detalle1"></div>
    <div id="detalle2"></div>
    <div id="detalle3" style="text-align:left;"></div>       
</center>